<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_dialog = 1;
include $this->admin_tpl('header', 'admin');
?>
<div class="pad-lr-10">
<form name="myform" id="myform" action="" method="post" >
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<th width="80" align="center">栏目权重</th>
			<th width="250" align="center">栏目名称</th>
			<th width="250" align="center">外部链接</th>
			<th width="50" align="center">是否显示栏目</th>
			<th width='200' align="center">修改时间</th>
			<th width="200" align="center">操作</th>
		</tr>
	</thead>
<tbody>
<?php
if(is_array($infos)){
	foreach($infos as $info){
		?>
	<tr>
		<td align="center"><?php echo $info['weight'];?></td>
		<td align="center"><?php echo $info['catName'];?></td>
		<td align="center"><?php echo $info['url'];?></td>
		<td align="center"><?php echo $info['display'];?></td>
		<td align="center"><?php echo $info['editTime'];?></td>
		<td align="center"><a href="###"
			onclick="edit(<?php echo $info['id']?>)"
			title="<?php echo L('edit')?>">修改</a> | <a
			href='?m=speciallist&c=speciallist&a=delete&id=<?php echo $info['id']?>&type=<?php echo $type;?>'
			onClick="return confirm('<?php echo L('confirm', array('message' => new_addslashes($info['catName'])))?>')">删除</a> 
			<input type="hidden" name="catName" value="<?php echo $info['catName'];?>"> <input type="hidden" name="id" value="<?php echo $info['id'];?>"> 
		</td>
	</tr>
	<?php
	}
}
?>
</tbody>
</table>
</div>
<div class="btn"> 
<div id="pages"><?php echo $pages?></div>
</form>
</div>
<script type="text/javascript">

function edit(id) {
	window.top.art.dialog({id:'edit'}).close();
	window.top.art.dialog({title:'修改栏目',id:'edit',iframe:'?m=speciallist&c=speciallist&a=edit&id='+id+'&type=<?php echo $type;?>&catName=<?php echo $info["catName"];?>',width:'700',height:'250'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
function checkuid() {
	var ids='';
	$("input[name='linkid[]']:checked").each(function(i, n){
		ids += $(n).val() + ',';
	});
	if(ids=='') {
		window.top.art.dialog({content:"<?php echo L('before_select_operations')?>",lock:true,width:'200',height:'50',time:1.5},function(){});
		return false;
	} else {
		myform.submit();
	}
}
//向下移动
function listorder_up(id) {
	$.get('?m=link&c=link&a=listorder_up&linkid='+id,null,function (msg) { 
	if (msg==1) { 
	//$("div [id=\'option"+id+"\']").remove(); 
		alert('<?php echo L('move_success')?>');
	} else {
	alert(msg); 
	} 
	}); 
} 
</script>
</body>
</html>
